package stud.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import stud.aistar.entity.Department;
import stud.aistar.mapper.DepartmentMapper;
import stud.aistar.service.IDepartmentService;

import java.util.List;

/**
 * Created by Jcdz on 2019/9/28.
 */
@Service
@Transactional
public class DepartmentServiceImpl implements IDepartmentService{

    @Autowired
    private DepartmentMapper departmentMapper;

    @Override
    public List<Department> findAll() {
        return departmentMapper.findAll();
    }

    @Override
    public Department findByName(String dept_name) {
        return departmentMapper.findByName(dept_name);
    }
}
